<template>
<div>
		<div class="common-form">
			<span>{{curItem.name}}</span>
		</div>
		<el-form size="small" :model="curItem" label-width="100px">
			<div class="f16 gray3 form-subtitle">{{$t('page.style_setting1')}}</div>
			<el-form-item :label="$t('page.theme_label')">
				<el-radio-group @change="changeType" v-model="curItem.style.type">
					<el-radio-button :label="1">{{$t('page.style_1')}}</el-radio-button>
					<el-radio-button :label="2">{{$t('page.style_2')}}</el-radio-button>
					<el-radio-button :label="3">{{$t('page.style_3')}}</el-radio-button>
					<el-radio-button :label="4">{{$t('page.style_4')}}</el-radio-button>
					<el-radio-button :label="5">{{$t('page.style_5')}}</el-radio-button>
					<el-radio-button :label="6">{{$t('page.style_6')}}</el-radio-button>
					<el-radio-button :label="7">{{$t('page.style_7')}}</el-radio-button>
				</el-radio-group>
			</el-form-item>
			<div class="form-chink"></div>
			<div class="f16 gray3 form-subtitle">{{$t('page.style_setting')}}</div>
			<!--间距-->
			<div class="form-item">
				<div class="form-label">{{$t('page.spacing_label')}}</div>
				<el-slider v-model="curItem.style.padding" size="small" show-input :show-input-controls="false" input-size="small"></el-slider>
			</div>
			<div class="form-item">
				<div class="form-label">{{$t('page.footer_bg_label')}}</div>
				<div class="flex-1 d-s-c" style="height: 36px;">
					<el-color-picker size="default" v-model="curItem.style.background"></el-color-picker>
					<el-input class="ml10" v-model="curItem.style.background" />
					<el-button style="margin-left: 10px;" @click.stop="$parent.onEditorResetColor(curItem.style, 'background', '#ffffff')" type="primary" link>{{$t('page.reset')}}</el-button>
				</div>
			</div>
			<div class="form-item">
				<div class="form-label">{{$t('page.component_bg_label')}}</div>
				<div class="flex-1 d-s-c" style="height: 36px;">
					<el-color-picker size="default" v-model="curItem.style.bgcolor"></el-color-picker>
					<el-input class="ml10" v-model="curItem.style.bgcolor" />
					<el-button style="margin-left: 10px;" @click.stop="$parent.onEditorResetColor(curItem.style, 'bgcolor', '#f2f2f2')" type="primary" link>{{$t('page.reset')}}</el-button>
				</div>
			</div>
			<!--上下边距-->
			<div class="form-item">
				<div class="form-label">{{$t('page.margin_top_label')}}</div>
				<el-slider v-model="curItem.style.paddingTop" size="small" show-input :show-input-controls="false" input-size="small"></el-slider>
			</div>
			<!--上下边距-->
			<div class="form-item">
				<div class="form-label">{{$t('page.margin_bottom_label')}}</div>
				<el-slider v-model="curItem.style.paddingBottom" size="small" show-input :show-input-controls="false" input-size="small"></el-slider>
			</div>
			<!--左右边距-->
			<div class="form-item">
				<div class="form-label">{{$t('page.margin_lr_label')}}</div>
				<el-slider v-model="curItem.style.paddingLeft" size="small" show-input :show-input-controls="false" input-size="small"></el-slider>
			</div>
		</el-form>
		<Setlink v-if="is_linkset" :is_linkset="is_linkset" @closeDialog="closeLinkset">{{$t('page.select_link')}}</Setlink>
	</div>
</template>

<script>
import Setlink from '@/components/setlink/Setlink.vue';
export default {
  components: {
    Setlink
  },
  data() {
    return {
      /*是否选择链接*/
      is_linkset: false,
      index: null
    };
  },
  props: ['curItem', 'selectedIndex', 'opts'],
  methods: {}
};
</script>

